<template>
	<div>
		<h1>welcome to 个人中心</h1>
		<p>{{son}}</p>
		<!-- 3.写入组件 -->
		<HelloWorld :son = "father" @onMsg="getMsg"></HelloWorld>
	</div>
</template>

<script>
// 1.引入组件
import HelloWorld from "../components/HelloWorld.vue";

export default {
	name:"User",
	// 2.注入组件
	components:{
		HelloWorld
	},
	data(){
		return {
			father:"哈哈",
			son:""
		}
	},
	methods:{
		getMsg(data){
			this.son = data;
		}
	}
}
</script>

<style scoped>
	
</style>
